package com.fr.report.form;

import com.fr.base.XMLable;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.report.AbstractTableDataSource;
import com.fr.report.io.xml.ReportXMLUtils;
import com.fr.report.web.ui.container.Container;

public class Form extends AbstractTableDataSource
  implements XMLable
{
  private static final long serialVersionUID = 8113907060011737400L;
  private Container container;

  public Form()
  {
  }

  public Form(Container paramContainer)
  {
    setContainer(paramContainer);
    this.container.setWidth(700);
    this.container.setHeight(500);
  }

  public Container getContainer()
  {
    return this.container;
  }

  public void setContainer(Container paramContainer)
  {
    this.container = paramContainer;
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    super.readXML(paramXMLableReader);
    if ((paramXMLableReader.isChildNode()) && (paramXMLableReader.getTagName().endsWith("Container")))
      this.container = ((Container)ReportXMLUtils.readXMLable(paramXMLableReader));
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    super.writeXML(paramXMLPrintWriter);
    ReportXMLUtils.writeXMLable(paramXMLPrintWriter, this.container, "Container");
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}